[parallel] Add spawn#3632
Closed
clabby wants to merge 8 commits into
Closed
Conversation
Deploying monorepo with
|
| Latest commit: |
6825c67
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://69028278.monorepo-eu0.pages.dev |
| Branch Preview URL: | https://cl-parallel-spawn.monorepo-eu0.pages.dev |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
commonware-mcp | 6825c67 | Apr 20 2026, 08:24 PM |
Move spawn() from Strategy into a new Bridge: Strategy trait. This keeps Strategy purely synchronous while Bridge provides the async-friendly spawn + SpawnHandle API for callers in async contexts.
…validation Spawn C::decode and map_partition_collect_vec onto the strategy's executor so the async worker can yield during block reconstruction and shard batch-validation. Use take_checked_shards to move shard data into the closure without cloning.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Adds a
spawnfunction to theStrategyinterface that accepts a closure containing a handle to theStrategyand returns a future containing the result. This interface allows composingrayon::spawn(|| pool.install(|| {/* ... */}))calls and awaiting a channel that contains the result, which prevents blocking the worker thread that kicked off the computation.